﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs" 
    Inherits="GMAC.ReportingSystem.ChangePassword" Theme="Theme" EnableEventValidation="false" 
    EnableTheming="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript" src="../Scripts/CheckFramesAndRedirect.js"></script>
    <script type="text/javascript">
        function ValidateLength(source, arguments)
        {
            if (arguments.Value.length < 8)
            {
                arguments.IsValid = false;
            }
            else
            {
                arguments.IsValid = true;
            }
        }
    </script>
    <style type="text/css">
        .style1
        {
            width: 171px;
        }
        .style2
        {
            width: 171px;
            height: 3px;
        }
        .style3
        {
            height: 3px;
        }
    </style>
</head>
<body class="TotalBody">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="Contenedor">
        <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
            <tr>
                <td class="TDSeparadorV">
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <span class="FontArialBoldCaps">You must change your password...</span>
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="TDSeparadorV">
                </td>
            </tr>
            <tr>
                <td class="TDSeparadorV">
                </td>
            </tr>
            <tr>
                <td align="center">
                    <table cellpadding="0" cellspacing="0" border="0" style="width: 637px; height: 150px;
                        border: solid 2px #bbbbbb; text-align: left">
                        <tr>
                            <td class="TDLabelBackground" style="width: 150px; vertical-align: middle; text-align: center" rowspan="2">
                                <img id="logoGMAC" src="App_Themes/Theme/Images/Images IE6/Keys.gif"   />
                            </td>
                            <td>
                                <table cellpadding="0" cellspacing="0" border="0">
                                    <tr>
                                        <td style="text-align: right;" class="style1">
                                            <span class="FontArialBold LabelRight12px">Enter the current password</span>
                                        </td>
                                        <td class="TDTextBox" style="text-align: left">
                                            <asp:TextBox ID="txtPasswordOld" runat="server" Text="" SkinID="TextBox12px" Width="180px" TextMode="Password" MaxLength="20"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="filterPasswordOld" runat="server" TargetControlID="txtPasswordOld" SkinID="filterAlphanumericNS"></cc1:FilteredTextBoxExtender>
                                        </td>
                                    </tr>
                                    <tr valign="middle">
                                        <td style="text-align: right; " class="style1">
                                            <span class="FontArialBold LabelRight12px">Enter the new password</span>
                                        </td>
                                        <td class="TDTextBox" style="text-align: left">
                                            <asp:TextBox ID="txtPassword" runat="server" Text="" TextMode="Password" SkinID="TextBox12px"
                                                Width="180px" MaxLength="20"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="filterPassword" runat="server" TargetControlID="txtPassword" SkinID="filterAlphanumericNS"></cc1:FilteredTextBoxExtender>
                                            <cc1:PasswordStrength ID="psPassword" runat="server" DisplayPosition="RightSide" MinimumNumericCharacters="0" MinimumSymbolCharacters="0" MinimumUpperCaseCharacters="1" RequiresUpperAndLowerCaseCharacters="true"
                                                TargetControlID="txtPassword" StrengthIndicatorType="Text" PreferredPasswordLength="8"
                                                TextStrengthDescriptions="Invalid; Valid" PrefixText="" StrengthStyles="PasswordStrength_Invalid;PasswordStrength_Valid"></cc1:PasswordStrength>
                                            <asp:CustomValidator ID="custPassword" runat="server" ControlToValidate="txtPassword" ClientValidationFunction="ValidateLength" ErrorMessage="The password is too short." Display="Dynamic">*</asp:CustomValidator>
                                            <asp:RegularExpressionValidator ID="regexPassword" runat="server" ControlToValidate="txtConfirmPassword" ValidationExpression="[a-z\d]*[A-Z]{1}[a-z\d]*" ErrorMessage="The password must contain at least one uppercase character" Display="Dynamic">*</asp:RegularExpressionValidator>
                                            <asp:CompareValidator ID="cvOldPassword" runat="server" ControlToValidate="txtPassword" ControlToCompare="txtPasswordOld" Type="String" Display="Dynamic" ErrorMessage="Your new password must be different from the old password" Operator="NotEqual">*</asp:CompareValidator>
                                            <cc1:ValidatorCalloutExtender ID="vcePassword" runat="server" TargetControlID="custPassword"></cc1:ValidatorCalloutExtender>
                                            <cc1:ValidatorCalloutExtender ID="vcePassword2" runat="server" TargetControlID="regexPassword"></cc1:ValidatorCalloutExtender>
                                            <cc1:ValidatorCalloutExtender ID="vcePassword3" runat="server" TargetControlID="cvOldPassword"></cc1:ValidatorCalloutExtender>
                                            
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="text-align: right; " class="style2">
                                            <span class="FontArialBold LabelRight12px">Confirm the new password</span>
                                        </td>
                                        <td class="TDTextBox" style="text-align: left">
                                            <asp:TextBox ID="txtConfirmPassword" runat="server" Text="" TextMode="Password" SkinID="TextBox12px" Width="180px" MaxLength="20"></asp:TextBox>
                                            <cc1:FilteredTextBoxExtender ID="filterConfirmPassword" runat="server" TargetControlID="txtConfirmPassword" SkinID="filterAlphanumericNS"></cc1:FilteredTextBoxExtender>
                                            <asp:CompareValidator ID="cvPassword" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword" ErrorMessage="Passwords do not match.">*</asp:CompareValidator>
                                            <cc1:ValidatorCalloutExtender ID="vceConfirmPassword" runat="server" TargetControlID="cvPassword"></cc1:ValidatorCalloutExtender>
                                            <asp:RequiredFieldValidator ID="rfvConfirmPassword" runat="server" ControlToValidate="txtConfirmPassword">*</asp:RequiredFieldValidator>
                                            <cc1:ValidatorCalloutExtender ID="vceConfirmPassword2" runat="server" TargetControlID="rfvConfirmPassword"></cc1:ValidatorCalloutExtender>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="center">
                                            <%--<td rowspan="4" style="vertical-align: middle; text-align: center; padding-left: 5px;
                                            padding-right: 5px">--%>
                                            <asp:ImageButton ID="btnAcceptChange" ImageAlign="Middle" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                                runat="server" OnClick="btnAcceptChange_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" valign="middle" style="cursor: pointer; cursor: hand">
                                &nbsp;</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <asp:UpdatePanel ID="upMessage" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnAcceptChange" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <asp:Panel ID="pnlMessage" runat="server" CssClass="modalPopup" Height="140px" Style="display: none;"
                Width="400px">
                <table width="100%">
                    <tr style="height: 100px">
                        <td style="height: 100%;" align="center">
                            <uc1:wucMessage ID="wucMessage" runat="server" />
                        </td>
                    </tr>
                    <tr style="vertical-align: bottom">
                        <td align="center">
                            <asp:ImageButton ID="btnAccept" runat="server" ImageUrl="~/App_Themes/Theme/Images/Botones/Botones Reducidos/Ingles/b_Accept.jpg"
                                CausesValidation="false" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="popupExtenderMessage" runat="server" BackgroundCssClass="modalBackground"
                DropShadow="false" PopupControlID="pnlMessage" TargetControlID="lnkPopupMessage"
                CancelControlID="btnAccept">
            </cc1:ModalPopupExtender>
            <asp:LinkButton ID="lnkPopupMessage" runat="server"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
